package com.xtpt.disaster.bean;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.Date;

@Repository
public class BackupFileInfo implements Serializable {
    @ApiModelProperty(value = "存储的备份文件的id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long bpfId;

    @ApiModelProperty(value = "存储的备份文件的源路径")
    private String bpfSourcepath;

    @ApiModelProperty(value = "备份文件的服务器存储路径")
    private String bpfStorepath;

    @ApiModelProperty(value = "存储的备份文件的文件类型")
    private Integer bpfFiletype;

    @ApiModelProperty(value = "存储的备份文件的版本")
    private String bpfVersion;

    @ApiModelProperty(value = "备份文件的任务的完成状态，成功SUCCESS(0) ERROR(1)")
    private Integer bpfStatus;

    @ApiModelProperty(value = "存储的备份的源文件的节点id")
    private Long fnodeId;

    @ApiModelProperty(value = "任务id")
    private Long taskId;

    @ApiModelProperty(value = "表信息创建时间")
    private Date createTime;

    @ApiModelProperty(value = "表信息修改时间")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public BackupFileInfo(Long bpfId, String bpfSourcepath, String bpfStorepath, Integer bpfFiletype, String bpfVersion, Integer bpfStatus, Long fnodeId, Long taskId, Date createTime, Date updateTime) {
        this.bpfId = bpfId;
        this.bpfSourcepath = bpfSourcepath;
        this.bpfStorepath = bpfStorepath;
        this.bpfFiletype = bpfFiletype;
        this.bpfVersion = bpfVersion;
        this.bpfStatus = bpfStatus;
        this.fnodeId = fnodeId;
        this.taskId = taskId;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public BackupFileInfo() {
        super();
    }

    public Long getBpfId() {
        return bpfId;
    }

    public void setBpfId(Long bpfId) {
        this.bpfId = bpfId;
    }

    public String getBpfSourcepath() {
        return bpfSourcepath;
    }

    public void setBpfSourcepath(String bpfSourcepath) {
        this.bpfSourcepath = bpfSourcepath;
    }

    public String getBpfStorepath() {
        return bpfStorepath;
    }

    public void setBpfStorepath(String bpfStorepath) {
        this.bpfStorepath = bpfStorepath;
    }

    public Integer getBpfFiletype() {
        return bpfFiletype;
    }

    public void setBpfFiletype(Integer bpfFiletype) {
        this.bpfFiletype = bpfFiletype;
    }

    public String getBpfVersion() {
        return bpfVersion;
    }

    public void setBpfVersion(String bpfVersion) {
        this.bpfVersion = bpfVersion;
    }

    public Integer getBpfStatus() {
        return bpfStatus;
    }

    public void setBpfStatus(Integer bpfStatus) {
        this.bpfStatus = bpfStatus;
    }

    public Long getFnodeId() {
        return fnodeId;
    }

    public void setFnodeId(Long fnodeId) {
        this.fnodeId = fnodeId;
    }

    public Long getTaskId() {
        return taskId;
    }

    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "BackupFileInfo{" +
                "bpfId=" + bpfId +
                ", bpfSourcepath='" + bpfSourcepath + '\'' +
                ", bpfStorepath='" + bpfStorepath + '\'' +
                ", bpfFiletype=" + bpfFiletype +
                ", bpfVersion='" + bpfVersion + '\'' +
                ", bpfStatus=" + bpfStatus +
                ", fnodeId=" + fnodeId +
                ", taskId=" + taskId +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}